<template>
	<view class="tt-slogan">
		<view class="tt-slogan-box">
			<view class="txt">{{msg}}</view>
			<view class="ico"></view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"tt-slogan-comp",
		props: {
			message: {
				type: String,
				default: '面试啦，造起来。'
			}
		},
		data() {
			return {
				timer: null,
				msg: ""
			};
		},
		methods: {
			setMsg(){
				this.msg = this.message;
				this.timer = setInterval(
				()=>{
					let s = this.msg.slice(0,1);
					let e = this.msg.slice(1);
					this.msg = e +  s;
				},
				1000
				)
			},
		},
		onLoad() {
			this.setMsg();
		}
	}
</script>

<style lang="scss">
.tt-slogan {
	width: 100%;
	height: 80rpx;
	border-bottom: 1px solid #f0f0f0;
	.tt-slogan-box {
		width: 100%;
		height: 80rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 0 30rpx;
		box-sizing: border-box;
		.txt{
			color: #666;
		}
		.ico {
			width: 50rpx;
			height: 50rpx;
			// #bfbfbf
			background-image: url(@/assets/icon-win.png);
			background-size: cover;
		}
	}
}
</style>